home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Components.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  19.5 KB  |  519 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Components.p
  3.  
  4.      Contains:    Component Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1991-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Components;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __COMPONENTS__}
  28. {$SETC __COMPONENTS__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ComponentsIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __ERRORS__}
  35. {$I Errors.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MACTYPES__}
  38. {$I MacTypes.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __MIXEDMODE__}
  41. {$I MixedMode.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49.  
  50. CONST
  51.     kAppleManufacturer            = 'appl';                        {  Apple supplied components  }
  52.     kComponentResourceType        = 'thng';                        {  a components resource type  }
  53.     kComponentAliasResourceType    = 'thga';                        {  component alias resource type  }
  54.  
  55.     kAnyComponentType            = 0;
  56.     kAnyComponentSubType        = 0;
  57.     kAnyComponentManufacturer    = 0;
  58.     kAnyComponentFlagsMask        = 0;
  59.  
  60.     cmpWantsRegisterMessage        = $80000000;
  61.     cmpIsComponentAlias            = $10000000;
  62.  
  63.     kComponentOpenSelect        = -1;                            {  ComponentInstance for this open  }
  64.     kComponentCloseSelect        = -2;                            {  ComponentInstance for this close  }
  65.     kComponentCanDoSelect        = -3;                            {  selector # being queried  }
  66.     kComponentVersionSelect        = -4;                            {  no params  }
  67.     kComponentRegisterSelect    = -5;                            {  no params  }
  68.     kComponentTargetSelect        = -6;                            {  ComponentInstance for top of call chain  }
  69.     kComponentUnregisterSelect    = -7;                            {  no params  }
  70.     kComponentGetMPWorkFunctionSelect = -8;                        {  some params  }
  71.  
  72. { Component Resource Extension flags }
  73.     componentDoAutoVersion        = $01;
  74.     componentWantsUnregister    = $02;
  75.     componentAutoVersionIncludeFlags = $04;
  76.     componentHasMultiplePlatforms = $08;
  77.     componentLoadResident        = $10;
  78.  
  79.  
  80.  
  81. { Set Default Component flags }
  82.     defaultComponentIdentical    = 0;
  83.     defaultComponentAnyFlags    = 1;
  84.     defaultComponentAnyManufacturer = 2;
  85.     defaultComponentAnySubType    = 4;
  86.     defaultComponentAnyFlagsAnyManufacturer = 3;
  87.     defaultComponentAnyFlagsAnyManufacturerAnySubType = 7;
  88.  
  89. { RegisterComponentResource flags }
  90.     registerComponentGlobal        = 1;
  91.     registerComponentNoDuplicates = 2;
  92.     registerComponentAfterExisting = 4;
  93.     registerComponentAliasesOnly = 8;
  94.  
  95.  
  96.  
  97. TYPE
  98.     ComponentDescriptionPtr = ^ComponentDescription;
  99.     ComponentDescription = RECORD
  100.         componentType:            OSType;                                    {  A unique 4-byte code indentifying the command set  }
  101.         componentSubType:        OSType;                                    {  Particular flavor of this instance  }
  102.         componentManufacturer:    OSType;                                    {  Vendor indentification  }
  103.         componentFlags:            UInt32;                                    {  8 each for Component,Type,SubType,Manuf/revision  }
  104.         componentFlagsMask:        UInt32;                                    {  Mask for specifying which flags to consider in search, zero during registration  }
  105.     END;
  106.  
  107.  
  108.     ResourceSpecPtr = ^ResourceSpec;
  109.     ResourceSpec = RECORD
  110.         resType:                OSType;                                    {  4-byte code   }
  111.         resID:                    INTEGER;                                {                }
  112.     END;
  113.  
  114.     ComponentResourcePtr = ^ComponentResource;
  115.     ComponentResource = RECORD
  116.         cd:                        ComponentDescription;                    {  Registration parameters  }
  117.         component:                ResourceSpec;                            {  resource where Component code is found  }
  118.         componentName:            ResourceSpec;                            {  name string resource  }
  119.         componentInfo:            ResourceSpec;                            {  info string resource  }
  120.         componentIcon:            ResourceSpec;                            {  icon resource  }
  121.     END;
  122.  
  123.     ComponentResourceHandle                = ^ComponentResourcePtr;
  124.     ComponentPlatformInfoPtr = ^ComponentPlatformInfo;
  125.     ComponentPlatformInfo = RECORD
  126.         componentFlags:            LONGINT;                                {  flags of Component  }
  127.         component:                ResourceSpec;                            {  resource where Component code is found  }
  128.         platformType:            INTEGER;                                {  gestaltSysArchitecture result  }
  129.     END;
  130.  
  131.     ComponentResourceExtensionPtr = ^ComponentResourceExtension;
  132.     ComponentResourceExtension = RECORD
  133.         componentVersion:        LONGINT;                                {  version of Component  }
  134.         componentRegisterFlags:    LONGINT;                                {  flags for registration  }
  135.         componentIconFamily:    INTEGER;                                {  resource id of Icon Family  }
  136.     END;
  137.  
  138.     ComponentPlatformInfoArrayPtr = ^ComponentPlatformInfoArray;
  139.     ComponentPlatformInfoArray = RECORD
  140.         count:                    LONGINT;
  141.         platformArray:            ARRAY [0..0] OF ComponentPlatformInfo;
  142.     END;
  143.  
  144.     ExtComponentResourcePtr = ^ExtComponentResource;
  145.     ExtComponentResource = RECORD
  146.         cd:                        ComponentDescription;                    {  registration parameters  }
  147.         component:                ResourceSpec;                            {  resource where Component code is found  }
  148.         componentName:            ResourceSpec;                            {  name string resource  }
  149.         componentInfo:            ResourceSpec;                            {  info string resource  }
  150.         componentIcon:            ResourceSpec;                            {  icon resource  }
  151.         componentVersion:        LONGINT;                                {  version of Component  }
  152.         componentRegisterFlags:    LONGINT;                                {  flags for registration  }
  153.         componentIconFamily:    INTEGER;                                {  resource id of Icon Family  }
  154.         count:                    LONGINT;                                {  elements in platformArray  }
  155.         platformArray:            ARRAY [0..0] OF ComponentPlatformInfo;
  156.     END;
  157.  
  158.     ComponentAliasResourcePtr = ^ComponentAliasResource;
  159.     ComponentAliasResource = RECORD
  160.         cr:                        ComponentResource;                        {  Registration parameters  }
  161.         aliasCD:                ComponentDescription;                    {  component alias description  }
  162.     END;
  163.  
  164. {  Structure received by Component:        }
  165.     ComponentParametersPtr = ^ComponentParameters;
  166.     ComponentParameters = PACKED RECORD
  167.         flags:                    UInt8;                                    {  call modifiers: sync/async, deferred, immed, etc  }
  168.         paramSize:                UInt8;                                    {  size in bytes of actual parameters passed to this call  }
  169.         what:                    INTEGER;                                {  routine selector, negative for Component management calls  }
  170.         params:                    ARRAY [0..0] OF LONGINT;                {  actual parameters for the indicated routine  }
  171.     END;
  172.  
  173.     ComponentRecordPtr = ^ComponentRecord;
  174.     ComponentRecord = RECORD
  175.         data:                    ARRAY [0..0] OF LONGINT;
  176.     END;
  177.  
  178.     Component                            = ^ComponentRecord;
  179.     ComponentInstanceRecordPtr = ^ComponentInstanceRecord;
  180.     ComponentInstanceRecord = RECORD
  181.         data:                    ARRAY [0..0] OF LONGINT;
  182.     END;
  183.  
  184.     ComponentInstance                    = ^ComponentInstanceRecord;
  185.     RegisteredComponentRecordPtr = ^RegisteredComponentRecord;
  186.     RegisteredComponentRecord = RECORD
  187.         data:                    ARRAY [0..0] OF LONGINT;
  188.     END;
  189.  
  190.     RegisteredComponentInstanceRecordPtr = ^RegisteredComponentInstanceRecord;
  191.     RegisteredComponentInstanceRecord = RECORD
  192.         data:                    ARRAY [0..0] OF LONGINT;
  193.     END;
  194.  
  195.     ComponentResult                        = LONGINT;
  196.  
  197. CONST
  198.     platform68k                    = 1;                            {  platform type (response from gestaltSysArchitecture)  }
  199.     platformPowerPC                = 2;
  200.     platformInterpreted            = 3;
  201.     platformWin32                = 4;
  202.  
  203.     mpWorkFlagDoWork            = $01;
  204.     mpWorkFlagDoCompletion        = $02;
  205.     mpWorkFlagCopyWorkBlock        = $04;
  206.     mpWorkFlagDontBlock            = $08;
  207.     mpWorkFlagGetProcessorCount    = $10;
  208.     mpWorkFlagGetIsRunning        = $40;
  209.  
  210.  
  211. TYPE
  212.     ComponentMPWorkFunctionHeaderRecordPtr = ^ComponentMPWorkFunctionHeaderRecord;
  213.     ComponentMPWorkFunctionHeaderRecord = RECORD
  214.         headerSize:                UInt32;
  215.         recordSize:                UInt32;
  216.         workFlags:                UInt32;
  217.         processorCount:            UInt16;
  218.         unused:                    SInt8;
  219.         isRunning:                SInt8;
  220.     END;
  221.  
  222. {$IFC TYPED_FUNCTION_POINTERS}
  223.     ComponentMPWorkFunctionProcPtr = FUNCTION(globalRefCon: UNIV Ptr; header: ComponentMPWorkFunctionHeaderRecordPtr): ComponentResult;
  224. {$ELSEC}
  225.     ComponentMPWorkFunctionProcPtr = ProcPtr;
  226. {$ENDC}
  227.  
  228. {$IFC TYPED_FUNCTION_POINTERS}
  229.     ComponentRoutineProcPtr = FUNCTION(VAR cp: ComponentParameters; componentStorage: Handle): ComponentResult;
  230. {$ELSEC}
  231.     ComponentRoutineProcPtr = ProcPtr;
  232. {$ENDC}
  233.  
  234.     ComponentMPWorkFunctionUPP = UniversalProcPtr;
  235.     ComponentRoutineUPP = UniversalProcPtr;
  236. {
  237.     The parameter list for each ComponentFunction is unique. It is
  238.     therefore up to users to create the appropriate procInfo for their
  239.     own ComponentFunctions where necessary.
  240. }
  241.     ComponentFunctionUPP                = UniversalProcPtr;
  242.  
  243. {*******************************************************
  244. *                                                        *
  245. *                  APPLICATION LEVEL CALLS                    *
  246. *                                                        *
  247. *******************************************************}
  248. {*******************************************************
  249. * Component Database Add, Delete, and Query Routines
  250. *******************************************************}
  251. FUNCTION RegisterComponent(VAR cd: ComponentDescription; componentEntryPoint: ComponentRoutineUPP; global: INTEGER; componentName: Handle; componentInfo: Handle; componentIcon: Handle): Component;
  252.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  253.     INLINE $7001, $A82A;
  254.     {$ENDC}
  255. FUNCTION RegisterComponentResource(cr: ComponentResourceHandle; global: INTEGER): Component;
  256.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  257.     INLINE $7012, $A82A;
  258.     {$ENDC}
  259. FUNCTION UnregisterComponent(aComponent: Component): OSErr;
  260.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  261.     INLINE $7002, $A82A;
  262.     {$ENDC}
  263. FUNCTION FindNextComponent(aComponent: Component; VAR looking: ComponentDescription): Component;
  264.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  265.     INLINE $7004, $A82A;
  266.     {$ENDC}
  267. FUNCTION CountComponents(VAR looking: ComponentDescription): LONGINT;
  268.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  269.     INLINE $7003, $A82A;
  270.     {$ENDC}
  271. FUNCTION GetComponentInfo(aComponent: Component; VAR cd: ComponentDescription; componentName: Handle; componentInfo: Handle; componentIcon: Handle): OSErr;
  272.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  273.     INLINE $7005, $A82A;
  274.     {$ENDC}
  275. FUNCTION GetComponentListModSeed: LONGINT;
  276.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  277.     INLINE $7006, $A82A;
  278.     {$ENDC}
  279. FUNCTION GetComponentTypeModSeed(componentType: OSType): LONGINT;
  280.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  281.     INLINE $702C, $A82A;
  282.     {$ENDC}
  283. {*******************************************************
  284. * Component Instance Allocation and dispatch routines
  285. *******************************************************}
  286. FUNCTION OpenAComponent(aComponent: Component; VAR ci: ComponentInstance): OSErr;
  287.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  288.     INLINE $702D, $A82A;
  289.     {$ENDC}
  290. FUNCTION OpenComponent(aComponent: Component): ComponentInstance;
  291.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  292.     INLINE $7007, $A82A;
  293.     {$ENDC}
  294. FUNCTION CloseComponent(aComponentInstance: ComponentInstance): OSErr;
  295.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  296.     INLINE $7008, $A82A;
  297.     {$ENDC}
  298. FUNCTION GetComponentInstanceError(aComponentInstance: ComponentInstance): OSErr;
  299.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  300.     INLINE $700A, $A82A;
  301.     {$ENDC}
  302. {*******************************************************
  303. *                                                        *
  304. *                      CALLS MADE BY COMPONENTS              *
  305. *                                                        *
  306. *******************************************************}
  307. {*******************************************************
  308. * Component Management routines
  309. *******************************************************}
  310. PROCEDURE SetComponentInstanceError(aComponentInstance: ComponentInstance; theError: OSErr);
  311.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  312.     INLINE $700B, $A82A;
  313.     {$ENDC}
  314. FUNCTION GetComponentRefcon(aComponent: Component): LONGINT;
  315.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  316.     INLINE $7010, $A82A;
  317.     {$ENDC}
  318. PROCEDURE SetComponentRefcon(aComponent: Component; theRefcon: LONGINT);
  319.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  320.     INLINE $7011, $A82A;
  321.     {$ENDC}
  322. FUNCTION OpenComponentResFile(aComponent: Component): INTEGER;
  323.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  324.     INLINE $7015, $A82A;
  325.     {$ENDC}
  326. FUNCTION OpenAComponentResFile(aComponent: Component; VAR resRef: INTEGER): OSErr;
  327.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  328.     INLINE $702F, $A82A;
  329.     {$ENDC}
  330. FUNCTION CloseComponentResFile(refnum: INTEGER): OSErr;
  331.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  332.     INLINE $7018, $A82A;
  333.     {$ENDC}
  334. FUNCTION GetComponentResource(aComponent: Component; resType: OSType; resID: INTEGER; VAR theResource: Handle): OSErr;
  335.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  336.     INLINE $7035, $A82A;
  337.     {$ENDC}
  338. FUNCTION GetComponentIndString(aComponent: Component; VAR theString: Str255; strListID: INTEGER; index: INTEGER): OSErr;
  339.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  340.     INLINE $7036, $A82A;
  341.     {$ENDC}
  342. FUNCTION ResolveComponentAlias(aComponent: Component): Component;
  343.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  344.     INLINE $7020, $A82A;
  345.     {$ENDC}
  346. {*******************************************************
  347. * Component Instance Management routines
  348. *******************************************************}
  349. FUNCTION GetComponentInstanceStorage(aComponentInstance: ComponentInstance): Handle;
  350.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  351.     INLINE $700C, $A82A;
  352.     {$ENDC}
  353. PROCEDURE SetComponentInstanceStorage(aComponentInstance: ComponentInstance; theStorage: Handle);
  354.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  355.     INLINE $700D, $A82A;
  356.     {$ENDC}
  357. FUNCTION GetComponentInstanceA5(aComponentInstance: ComponentInstance): LONGINT;
  358.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  359.     INLINE $700E, $A82A;
  360.     {$ENDC}
  361. PROCEDURE SetComponentInstanceA5(aComponentInstance: ComponentInstance; theA5: LONGINT);
  362.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  363.     INLINE $700F, $A82A;
  364.     {$ENDC}
  365. FUNCTION CountComponentInstances(aComponent: Component): LONGINT;
  366.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  367.     INLINE $7013, $A82A;
  368.     {$ENDC}
  369. { useful helper routines for convenient method dispatching }
  370. FUNCTION CallComponentFunction(VAR params: ComponentParameters; func: ComponentFunctionUPP): LONGINT;
  371.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  372.     INLINE $70FF, $A82A;
  373.     {$ENDC}
  374. FUNCTION CallComponentFunctionWithStorage(storage: Handle; VAR params: ComponentParameters; func: ComponentFunctionUPP): LONGINT;
  375.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  376.     INLINE $70FF, $A82A;
  377.     {$ENDC}
  378. {$IFC TARGET_CPU_PPC AND TARGET_OS_MAC }
  379. FUNCTION CallComponentFunctionWithStorageProcInfo(storage: Handle; VAR params: ComponentParameters; func: ProcPtr; funcProcInfo: LONGINT): LONGINT;
  380. {$ELSEC}
  381. {$ENDC}
  382.  
  383. FUNCTION DelegateComponentCall(VAR originalParams: ComponentParameters; ci: ComponentInstance): LONGINT;
  384.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  385.     INLINE $7024, $A82A;
  386.     {$ENDC}
  387. FUNCTION SetDefaultComponent(aComponent: Component; flags: INTEGER): OSErr;
  388.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  389.     INLINE $701E, $A82A;
  390.     {$ENDC}
  391. FUNCTION OpenDefaultComponent(componentType: OSType; componentSubType: OSType): ComponentInstance;
  392.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  393.     INLINE $7021, $A82A;
  394.     {$ENDC}
  395. FUNCTION OpenADefaultComponent(componentType: OSType; componentSubType: OSType; VAR ci: ComponentInstance): OSErr;
  396.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  397.     INLINE $702E, $A82A;
  398.     {$ENDC}
  399. FUNCTION CaptureComponent(capturedComponent: Component; capturingComponent: Component): Component;
  400.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  401.     INLINE $701C, $A82A;
  402.     {$ENDC}
  403. FUNCTION UncaptureComponent(aComponent: Component): OSErr;
  404.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  405.     INLINE $701D, $A82A;
  406.     {$ENDC}
  407. FUNCTION RegisterComponentResourceFile(resRefNum: INTEGER; global: INTEGER): LONGINT;
  408.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  409.     INLINE $7014, $A82A;
  410.     {$ENDC}
  411. FUNCTION GetComponentIconSuite(aComponent: Component; VAR iconSuite: Handle): OSErr;
  412.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  413.     INLINE $7029, $A82A;
  414.     {$ENDC}
  415.  
  416. {*******************************************************
  417. *                                                        *
  418. *              Direct calls to the Components                *
  419. *                                                        *
  420. *******************************************************}
  421. {  Old style names }
  422.  
  423. FUNCTION ComponentFunctionImplemented(ci: ComponentInstance; ftnNumber: INTEGER): LONGINT;
  424.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  425.     INLINE $2F3C, $0002, $FFFD, $7000, $A82A;
  426.     {$ENDC}
  427. FUNCTION GetComponentVersion(ci: ComponentInstance): LONGINT;
  428.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  429.     INLINE $2F3C, $0000, $FFFC, $7000, $A82A;
  430.     {$ENDC}
  431. FUNCTION ComponentSetTarget(ci: ComponentInstance; target: ComponentInstance): LONGINT;
  432.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  433.     INLINE $2F3C, $0004, $FFFA, $7000, $A82A;
  434.     {$ENDC}
  435. {  New style names }
  436.  
  437. FUNCTION CallComponentOpen(ci: ComponentInstance; self: ComponentInstance): ComponentResult;
  438.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  439.     INLINE $2F3C, $0004, $FFFF, $7000, $A82A;
  440.     {$ENDC}
  441. FUNCTION CallComponentClose(ci: ComponentInstance; self: ComponentInstance): ComponentResult;
  442.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  443.     INLINE $2F3C, $0004, $FFFE, $7000, $A82A;
  444.     {$ENDC}
  445. FUNCTION CallComponentCanDo(ci: ComponentInstance; ftnNumber: INTEGER): ComponentResult;
  446.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  447.     INLINE $2F3C, $0002, $FFFD, $7000, $A82A;
  448.     {$ENDC}
  449. FUNCTION CallComponentVersion(ci: ComponentInstance): ComponentResult;
  450.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  451.     INLINE $2F3C, $0000, $FFFC, $7000, $A82A;
  452.     {$ENDC}
  453. FUNCTION CallComponentRegister(ci: ComponentInstance): ComponentResult;
  454.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  455.     INLINE $2F3C, $0000, $FFFB, $7000, $A82A;
  456.     {$ENDC}
  457. FUNCTION CallComponentTarget(ci: ComponentInstance; target: ComponentInstance): ComponentResult;
  458.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  459.     INLINE $2F3C, $0004, $FFFA, $7000, $A82A;
  460.     {$ENDC}
  461. FUNCTION CallComponentUnregister(ci: ComponentInstance): ComponentResult;
  462.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  463.     INLINE $2F3C, $0000, $FFF9, $7000, $A82A;
  464.     {$ENDC}
  465. FUNCTION CallComponentGetMPWorkFunction(ci: ComponentInstance; VAR workFunction: ComponentMPWorkFunctionUPP; VAR refCon: UNIV Ptr): ComponentResult;
  466.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  467.     INLINE $2F3C, $0008, $FFF8, $7000, $A82A;
  468.     {$ENDC}
  469.  
  470. {$IFC NOT TARGET_OS_MAC }
  471.         CallComponent is used by ComponentGlue routines to manually call a component function.
  472.      }
  473. FUNCTION CallComponent(ci: ComponentInstance; VAR cp: ComponentParameters): ComponentResult;
  474. {$ENDC}
  475.  
  476. { UPP call backs }
  477.  
  478. CONST
  479.     uppComponentMPWorkFunctionProcInfo = $000003F0;
  480.     uppComponentRoutineProcInfo = $000003F0;
  481.  
  482. FUNCTION NewComponentMPWorkFunctionProc(userRoutine: ComponentMPWorkFunctionProcPtr): ComponentMPWorkFunctionUPP;
  483.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  484.     INLINE $2E9F;
  485.     {$ENDC}
  486.  
  487. FUNCTION NewComponentRoutineProc(userRoutine: ComponentRoutineProcPtr): ComponentRoutineUPP;
  488.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  489.     INLINE $2E9F;
  490.     {$ENDC}
  491.  
  492. FUNCTION CallComponentMPWorkFunctionProc(globalRefCon: UNIV Ptr; header: ComponentMPWorkFunctionHeaderRecordPtr; userRoutine: ComponentMPWorkFunctionUPP): ComponentResult;
  493.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  494.     INLINE $205F, $4E90;
  495.     {$ENDC}
  496.  
  497. FUNCTION CallComponentRoutineProc(VAR cp: ComponentParameters; componentStorage: Handle; userRoutine: ComponentRoutineUPP): ComponentResult;
  498.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  499.     INLINE $205F, $4E90;
  500.     {$ENDC}
  501. { ProcInfos }
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508. {$ALIGN RESET}
  509. {$POP}
  510.  
  511. {$SETC UsingIncludes := ComponentsIncludes}
  512.  
  513. {$ENDC} {__COMPONENTS__}
  514.  
  515. {$IFC NOT UsingIncludes}
  516.  END.
  517. {$ENDC}
  518.